load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "nodelocal",
    srcs = [
        "nodelocal_connection.go",
        "nodelocal_storage.go",
        "test_nodelocal_storage.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/cloud/nodelocal",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/base",
        "//pkg/blobs",
        "//pkg/cloud",
        "//pkg/cloud/cloudpb",
        "//pkg/cloud/externalconn",
        "//pkg/cloud/externalconn/connectionpb",
        "//pkg/cloud/externalconn/utils",
        "//pkg/roachpb",
        "//pkg/server/telemetry",
        "//pkg/settings/cluster",
        "//pkg/util/buildutil",
        "//pkg/util/ioctx",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_cockroachdb_errors//oserror",
        "@org_golang_google_grpc//codes",
        "@org_golang_google_grpc//status",
    ],
)

go_test(
    name = "nodelocal_test",
    srcs = ["nodelocal_storage_test.go"],
    embed = [":nodelocal"],
    deps = [
        "//pkg/cloud/cloudtestutils",
        "//pkg/security/username",
        "//pkg/settings/cluster",
        "//pkg/testutils",
        "//pkg/util/leaktest",
    ],
)
